import * as ActionTypes from './actionTypes'
import { Route, MenuBtn } from '@/model/route'
/**
 * 设置路由表数据
 * @param {Route[]}routeList
 */
export const setRouteList = (routeList: Route[]) => ({
  type: ActionTypes.ROUTE_LIST,
  routeList
})

export const setCurrentPath = (currentPath: string) => ({
  type: ActionTypes.CURRENT_PATH,
  currentPath
})

export const setMenus = (menus: MenuBtn[]) => ({
  type: ActionTypes.MENUS,
  menus
})

export const setDelPath = (delPath: string) => ({
  type: ActionTypes.DEL_PATH,
  delPath
})
